ActivityCompat
Helper for accessing features in android.app.Activity.
Types
Link copied to clipboard
interface OnRequestPermissionsResultCallback
This interface is the contract for receiving the results for permission requests.
Link copied to clipboard
interface PermissionCompatDelegate
Customizable delegate that allows delegating permission compatibility methods to a custom implementation.
Link copied to clipboard
Functions
Link copied to clipboard
Finish this activity, and tries to finish all activities immediately below it in the current task that have the same affinity.
Link copied to clipboard
Reverses the Activity Scene entry Transition and triggers the calling Activity to reverse its exit Transition.
Link copied to clipboard
Link copied to clipboard
Return information about who launched this activity.
Link copied to clipboard
Invalidate the activity's options menu, if able.
Link copied to clipboard
Indicates whether this activity is launched from a bubble.
Link copied to clipboard
Link copied to clipboard
@Nullable
Create DragAndDropPermissionsCompat object bound to this activity and controlling the access permissions for content URIs associated with the android.view.DragEvent.
Link copied to clipboard
Link copied to clipboard
open fun <T : View?> requireViewById(@NonNull activity: @NonNull Activity, @IdRes id: Int): @NonNull T
Finds a view that was identified by the
android:id
XML attribute that was processed in onCreate, or throws an IllegalArgumentException if the ID is invalid, or there is no matching view in the hierarchy.Link copied to clipboard
open fun setEnterSharedElementCallback(@NonNull activity: @NonNull Activity, @Nullable callback: @Nullable SharedElementCallback)
When makeSceneTransitionAnimation was used to start an Activity, callback will be called to handle shared elements on the launched Activity.
Link copied to clipboard
open fun setExitSharedElementCallback(@NonNull activity: @NonNull Activity, @Nullable callback: @Nullable SharedElementCallback)
When makeSceneTransitionAnimation was used to start an Activity, callback will be called to handle shared elements on the launching Activity.
Link copied to clipboard
open fun setLocusContext(@NonNull activity: @NonNull Activity, @Nullable locusId: @Nullable LocusIdCompat, @Nullable bundle: @Nullable Bundle)
Sets the LocusIdCompat for this activity.
Link copied to clipboard
open fun setPermissionCompatDelegate(@Nullable delegate: @Nullable ActivityCompat.PermissionCompatDelegate)
Sets the permission delegate for
ActivityCompat
.Link copied to clipboard
open fun shouldShowRequestPermissionRationale(@NonNull activity: @NonNull Activity, @NonNull permission: @NonNull String): Boolean
Gets whether you should show UI with rationale before requesting a permission.
Link copied to clipboard
open fun startActivityForResult(@NonNull activity: @NonNull Activity, @NonNull intent: @NonNull Intent, requestCode: Int, @Nullable options: @Nullable Bundle)
Start new activity with options, if able, for which you would like a result when it finished.
Link copied to clipboard
open fun startIntentSenderForResult(@NonNull activity: @NonNull Activity, @NonNull intent: @NonNull IntentSender, requestCode: Int, @Nullable fillInIntent: @Nullable Intent, flagsMask: Int, flagsValues: Int, extraFlags: Int, @Nullable options: @Nullable Bundle)
Start new IntentSender with options, if able, for which you would like a result when it finished.
Link copied to clipboard